package com.atserver.listener;

import com.atserver.windows.ScannerWindow;

import javax.swing.*;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;

/**
 * @program: atserver
 * @Description: 监听扫描仪输入
 * @author: Mr.Cheng
 * @date: 2022/5/10 4:41 下午
 */
public class TextFieldFocusListener implements FocusListener {

    private ScannerWindow jFrame;


    public TextFieldFocusListener(ScannerWindow jFrame) {
        this.jFrame = jFrame;
    }

    /**
     * Invoked when a component gains the keyboard focus.
     *
     * @param e
     */
    @Override
    public void focusGained(FocusEvent e) {

    }

    /**
     * Invoked when a component loses the keyboard focus.
     *
     * @param e
     */
    @Override
    public void focusLost(FocusEvent e) {
        //this.jFrame.getInputTextField().requestFocus();
    }
}
